/*
  解法：双指针
  为什么：无
  时间复杂度：O(n)，空间复杂度：O(1)
 */

#include <iostream>
#include <vector>
#include <algorithm> // std::reverse

using namespace std;

class Solution
{
public:
	void reverseString(vector<char>& s)
	{
		reverse(s.begin(),s.end());
	}
};

int main()
{
	Solution solution;
	
	// 示例输入1：["h","e","l","l","o"]
	vector<char> s = {'h', 'e', 'l', 'l', 'o'};
	
	solution.reverseString(s);
	
	// 输出结果：["o","l","l","e","h"]
	cout << "反转后的字符数组为：";
	for (char c : s)
	{
		cout << "\"" << c << "\" ";
	}
	cout << endl;
	
	return 0;
}


